package com.refusea.train.domain.rsp

data class Rsp(val code: Int, val errmsg: String?, val data: Any?) {

    companion object {
        private const val SUCCESS = 200
        fun success(data: Any? = null) = Rsp(SUCCESS, null, data)
        fun error(errmsg: String) = Rsp(500, errmsg, null)
    }

}
